<?php
	$db = mysql_connect("localhost", "phylotype","phylo");

	mysql_select_db("phylotype",$db);

	$virus_name = $_GET['virus_name'];
?>

<html>
	<head>
		<?php echo("<title>Oxford Evolutionary Biology - $title</title>\n"); ?>
		<link href="../evolve.css" rel="stylesheet" media="screen">
	</head>

<body>

<?php 
	include("../evolve.inc");
	
	drawHeader();

	if ($virus_name) {
			
		$result = mysql_query("SELECT * FROM queries WHERE name=\"$virus_name\"",$db);
	
		if ($sequence = mysql_fetch_array($result)) {
	
			do {
				printf("<p>&gt;%s<br>%s</p>", $sequence["acc"], $sequence["seq"]);
			} while ($sequence = mysql_fetch_array($result));
		}
	} else {
		$result = mysql_query("SELECT * FROM queries",$db);
	
		if ($sequence = mysql_fetch_array($result)) {
	
			do {
				printf("<p>&gt;%s<br>%s</p>", $sequence["acc"], $sequence["seq"]);
			} while ($sequence = mysql_fetch_array($result));
		}
	}	
	drawFooter("Andrew Rambaut"); 
	closeDocument();
?>
       
